<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>购物车</title>
    <link rel="stylesheet" type="text/css" href="new_file.css"/>
    <link type="text/css" rel="stylesheet" href="css/bootstrap.css">
	<link type="text/css" rel="stylesheet" href="css/style.css">
</head>
<body>
<!--header-->
<jsp:include page="/header.jsp">
    <jsp:param name="flag" value="1"></jsp:param>
</jsp:include>

<div class="cart-items">
		<div class="container">
			
				
					<table  class="table table-bordered table-hover" text-align="center">
					
						<tr>
							<th width="20%">内容</th>
							<th width="20%">名称</th>
							<th width="15%">价格</th>
							<th width="25%">数量</th>
							<th width="20%">操作</th>
						</tr>
						
					
		 <c:forEach items="${carlist }" var="c">
						<tr>
						<td><a href="goodsxq?id=${c.description }" target="_blank"><img src="${c.imgurl }"  class="img-responsive" width="100px" height="100px"></td>
						<td><p><a href="goods_detail?id=${item.key}">${c.name}</a></p></td>
						<td><p>${c.price}</p></td>
						<td><h4><a class="btn btn-info" href="javascript:buy(${item.key});">＋</a>&nbsp;${item.value.amount}&nbsp;<a class="btn btn-warning" href="javascript:lessen(${item.key});">--</a></h4></td>
						<td><p><a class="btn btn-danger" href="javascript:deletes(${item.key});">删除</a></p></td>
						</tr>
						<div class="clearfix"></div>
					</c:forEach>
					</table>
				
			
<c:if test="${carlist==null}">
<h4>购物车为空</h4>
</c:if>
<div id="fudong" style="height:80px;width:400px;">
</div>
			
			<div class="cart-header col-md-12">
				<hr>
				<h4>总计: ¥ ${order.total}</h4>
				<a class="btn btn-success btn-lg" style="margin-left:74%" href="CanServlet">提交订单</a>
			</div>
			
			
			
		</div>
	</div>					

    </table>
</div>
<h2 align="right"><a href="DServlet">提交订单</a></h2>
<h2 align="right"><a href="IndexServlet">返回首页</a></h2>
</body>
</html>
